package blackeagle.ems.entities;

import blackeagle.ems.dal.DataList;

/**
 * A collection of Departments.
 */
public class DepartmentCollection extends DataList<Department, DepartmentCollection> {
    /**
     * The default 0-parameter constructor.
     */
    public DepartmentCollection(){}
    
    @Override
    public Department getById(Integer id){
        Department retval = null;
        
        for(Department d : this){
            if(d.getId()==id){
                retval = d;
                break;
            }
        }
        
        return retval;
    }
}
